﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Atendimento.Master" AutoEventWireup="true" Theme="Adm" CodeBehind="RelatorioUnidadeSaude.aspx.cs" Inherits="PROAD.admin.Relatorio.RelatorioUnidadeSaude" %>
<asp:Content ID="Content1" ContentPlaceHolderID="IncludeHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="IncludeTitulo" runat="server">
    <h1>Relatório de Unidades de Saúde</h1>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="IncludeCaminho" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="IncludeConteudo" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlPesquisa" runat="server">
                 <table width="100%" cellpadding="2" cellspacing="2" border="0">
                      <tr>
                           <td>UF</td>
                           <td>Município</td>
                      </tr>
                      <tr>
                           <td>
                                <asp:DropDownList ID="ddlUf" runat="server" DataTextField="NO_SIGLA" 
                                    DataValueField="CO_UF" onselectedindexchanged="ddlUf_SelectedIndexChanged" AutoPostBack="true">
                                </asp:DropDownList>
                           </td>
                           <td>
                                <asp:DropDownList ID="ddlMunicipio" runat="server" DataTextField="NO_CIDADE" DataValueField="CO_CIDADE">
                                </asp:DropDownList>
                          </td>
                      </tr>
                      <tr>
                        <td>
                            <asp:Button ID="btnPesquisar" runat="server" Text="Pesquisar" 
                                onclick="btnPesquisar_Click" />                
                        </td>
                      </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pnlGrid" runat="server" Visible="false">
                <table width="100%" cellpadding="2" cellspacing="2" border="0">
                    <tr>
                        <td>
                            <center>
                                <asp:Button ID="btnNovaPesquisa" runat="server" Text="Nova Pesquisa" onclick="btnNovaPesquisa_Click" 
                                 /> 
                            </center>
                        </td>
                    </tr>
                     <tr>
                        <td>
                            <asp:GridView ID="gdrListaUS" runat="server" AutoGenerateColumns="false" 
                                SkinID="GridAdm" Width="100%" 
                                EmptyDataText="Nenhum resultado para a pesquisar." 
                                EmptyDataRowStyle-ForeColor="Red" onrowdatabound="gdrListaUS_RowDataBound" OnPageIndexChanging="gdrListaUS_PageIndexChanging" AllowPaging="True">
                                 <HeaderStyle HorizontalAlign="Left" />
                                <Columns>
                                    
                                    <asp:BoundField DataField="NO_US" HeaderText="Unidade de Saúde" />
                                    <asp:BoundField DataField="CO_UF" HeaderText="Unidade da Federação" />
                                    <asp:BoundField DataField="CO_MUNICIPIO" HeaderText="Município" />
                                </Columns>
                            </asp:GridView>                            
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblTotalUnidade" runat="server" Font-Bold="True"></asp:Label>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="IncludeRodape" runat="server">
</asp:Content>
